![]() |
DisposePalette |
||||
Header: | Palettes.h | Carbon status: | Supported | |
Disposes of a palette.
void DisposePalette ( PaletteHandle srcPalette );
A handle to the palette to be disposed of.
If the palette has any entries allocated for animation on any screen device, then DisposePalette relinquishes these entries before the palette’s memory is released.
If a palette is attached to a window automatically—because the palette resource and the window have the same ID—you do not have to call the DisposePalette function to dispose of the function. The Palette Manager and Window Manager dispose of the palette automatically if the palette is replaced or if the window goes away.
However, if you explicitly attach a palette to a window with the SetPalette or NSetPalette function, your application owns the palette and is responsible for disposing of it. It is possible to attach a single palette to multiple windows; therefore, even when a window goes away and no longer needs a palette, other windows may still need it.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)